<template>
	<view class="main-content">
		<index-header :statusBarHeight="statusBarHeight"></index-header>
		<view class="content" :style="{'padding-top': statusBarHeightS +'px'}">
			<view class="bg">
				<ban title="新书推荐"></ban>
	      
			<view class="orglist">
				<view class="org" v-for="(item, index) in booklist" :key="index">
					<image :src="item.pic" class="ys_img"></image>
					<view class="sm">
						{{item.name}}
					</view>
				</view>
				
			</view>
			</view>
	    </view>
		<bottom></bottom>
	</view>
</template>

<script>
	let timer =null
	export default{
		data() {
		    return {
				booklist:[
					{pic:'../../static/img/book.jpg',name:'2016—2017测绘科学技术学科发展报告'},
					{pic:'../../static/img/book.jpg',name:'2016—2017测绘科学技术学科发展报告'},
					{pic:'../../static/img/book.jpg',name:'2016—2017测绘科学技术学科发展报告'},
					{pic:'../../static/img/book.jpg',name:'2016—2017测绘科学技术学科发展报告'},
					{pic:'../../static/img/book.jpg',name:'2016—2017测绘科学技术学科发展报告'},
					{pic:'../../static/img/book.jpg',name:'2016—2017测绘科学技术学科发展报告'},
				],
				statusBarHeight:'',
				statusBarHeightS:''
		    };
		},
		onShow(e) {
		    // #ifdef MP-WEIXIN || APP-PLUS || APP-PLUS-NVUE
			   var sysinfo = uni.getSystemInfoSync();
			   this.statusBarHeight = sysinfo.statusBarHeight + 44;
			   this.statusBarHeightS = sysinfo.statusBarHeight + 120;
			// #endif
			// #ifdef H5
			   var sysinfo = uni.getSystemInfoSync();
			   this.statusBarHeight = '0';
			   this.statusBarHeightS = '54';
			// #endif
		},
        onReachBottom() {
            //阻止重复加载
			uni.showLoading({title: '加载中',mask:true});
            if(timer !== null){
                clearTimeout(timer)
            }
            timer=setTimeout(e=>{
				
				this.booklist.push(
					{pic:'../../static/img/book.jpg',name:'2016—2017测绘科学技术学科发展报告'},
					{pic:'../../static/img/book.jpg',name:'2016—2017测绘科学技术学科发展报告'},
					{pic:'../../static/img/book.jpg',name:'2016—2017测绘科学技术学科发展报告'},
					{pic:'../../static/img/book.jpg',name:'2016—2017测绘科学技术学科发展报告'},
					{pic:'../../static/img/book.jpg',name:'2016—2017测绘科学技术学科发展报告'},
					{pic:'../../static/img/book.jpg',name:'2016—2017测绘科学技术学科发展报告'},
				)
				 uni.hideLoading()
			},500)
            // this.getMoreNews()
        }
	}
	
</script>

<style lang="scss">
    .content {
        width: 750upx;
        height: auto;
        padding-top: 108upx;
		margin-bottom: 100upx;
    }
	
	.ys_img{
		width: 260upx;
		height: 369upx;
	}
	.sm{
		text-align: center;
	}
	.orglist{
		margin: 20upx 100upx;
	}
	.org{
		width: 260upx;
		    overflow: hidden;
		    float: left;
		    margin-top: 40upx;
		    margin-left: 10upx;
		    line-height: 0px;
	}

	
</style>
